package com.central.dataManage.service;

import com.central.common.model.Result;
import com.central.common.model.SysUser;
import com.central.common.service.ISuperService;
import com.central.dataManage.model.DatabaseInfo;

import java.sql.SQLException;

/**
 * @author Tindy
 * @date 2021/7/5
 * @describe
 */
public interface IDatabaseService extends ISuperService<DatabaseInfo> {

    void delByDatasourceId(Long datasourceId);

    Result createDatabase(Long datasourceId, String dbName, String reason);

    Result dropDatabase(Long databaseId, String reason);

    Boolean synchDatabase(Long databaseId) throws SQLException;

    DatabaseInfo getUserDb(SysUser user);
    DatabaseInfo getProDb(SysUser user);
}